<!-- imports -->
<%@page import="java.util.ArrayList"%>
<%@page import="www.worq.controller.beans.personalBean"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page language="java"%>
<%
	if (request.getSession().getAttribute("sesion") == null) {
		request.getSession().setAttribute("error", 1);
		response.sendRedirect("loginErrors");
	} else {
		personalBean usuario = (personalBean) request.getSession()
				.getAttribute("sesion");
		ArrayList<personalBean> personal = (ArrayList) request
				.getAttribute("imprimir");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!--IMPORTANTO ESTILOS-->
<link rel="stylesheet" href="CSS/home.css" type="text/css" />
<!--IMPORTANTO JS-->
<SCRIPT type=text/javascript src="JS/login.js"></SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OREQ</title>
</head>
<body onload="javascript:window.print()">
	<div id="headerIMPRESION">
		<p class="bienvenida">
			<%
				out.println(usuario.getOficina());
					out.println("<br>");
					out.println(usuario.getNombre());
					out.println("<br>");
					out.println(usuario.getRol());
					out.println("<br>");
					out.println(usuario.getEmail());
					out.println("<br>");
					out.println(usuario.getDireccion());
			%>
		</p>
	</div>
		<table id="customers" width="1000px">
			<tr>
				<th>OFICINA</th>
				<th>NOMBRE</th>
				<th>ROL</th>
				<th>MATRICULA</th>
			</tr>
			<%
				for (personalBean bean : personal) {
						out.println("<tr class='alt'>");
						out.println("<td>");
						out.println(bean.getOficina());
						out.println("</td>");
						out.println("<td>");
						out.println(bean.getNombre());
						out.println("</td>");
						out.println("<td>");
						out.println(bean.getRol());
						out.println("</td>");
						out.println("<td>");
						out.println(bean.getMatricula());
						out.println("</td>");
						out.println("</tr>");
					}
			%>
		</table>
</body>
</html>
<%
	}
%>